package com.dg.param;

import lombok.*;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@NoArgsConstructor
@Builder
@AllArgsConstructor
public class AclModuleParam {

    private Integer id;

    @NotBlank
    @Length(min = 1, max =20, message = "权限模块名称长度必须在1~20之间")
    private String name;

    @NotNull(message = "parentId不能为空")
    private Integer parentId;

    @NotNull(message = "顺序不能为空")
    private Integer seq;

    @Min(value = 0, message = "状态最小为0")
    @Max(value = 2, message = "状态最大为2")
    @NotNull(message = "状态不能为空")
    private Integer status;

    @Length(max =200, message = "备注长度必须在200个字之内")
    private String remark;

}
